<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="title">
	<h3>Users</h3>
	Listing of all users
</div>
<div class="hastable">
	<form name="myform" class="pager-form" method="post" action="#">
		<table id="sort-table">
			<thead>
				<tr>
					<th>
						<input type="checkbox" value="check_none"
							onclick="this.value=check(this.form.list)" class="submit" />
					</th>
					<th>
						#
					</th>
					<th>
						User name
					</th>
					<th>
						Password
					</th>
					<th style="width: 132px">
						Options
					</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${users.resultSet}" var="user">
					<tr>
						<td class="center">
							<input type="checkbox" value="1" name="list" class="checkbox" />
						</td>
						<td>${user.id}</td>
						<td>${user.username}</td>
						<td>${user.password}</td>
						<td>
							<a class="btn_no_text btn ui-state-default ui-corner-all tooltip"
								title="Edit this example" href="#"> <span
								class="ui-icon ui-icon-wrench"></span> </a>
							<a class="btn_no_text btn ui-state-default ui-corner-all tooltip"
								title="Favourite this example" href="#"> <span
								class="ui-icon ui-icon-heart"></span> </a>
							<a class="btn_no_text btn ui-state-default ui-corner-all tooltip"
								title="Add to shopping card example" href="#"> <span
								class="ui-icon ui-icon-cart"></span> </a>
							<a class="btn_no_text btn ui-state-default ui-corner-all tooltip"
								title="Delete this example" href="#"> <span
								class="ui-icon ui-icon-circle-close"></span> </a>
						</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</form>
	<ul class="pagination">
		<c:forEach items="${users.pages}" var="page">
			<c:choose>
				<c:when test="${users.pager.page == page}">
					<li class="active">${page}</li>
				</c:when>
				<c:otherwise>
					<li><a href="?page=${page}&pageSize=${users.pager.pageSize}">${page}</a></li>
				</c:otherwise>
			</c:choose>			
		</c:forEach>
	</ul>
</div>